<include file='Common:head'/>
<form enctype="multipart/form-data" id="upForm" method="post">
<foreach name="list" item="vo">
<div class="shop_list" style="padding:5% 0 0 0;margin:5% 0;">
	<div class="shop_img fl"> <!-- 店铺图 -->
		<img src="{$vo.weixin_avatar}"/>
	</div>
	<div class="shop_info">
		<div class="title_left fl" style="padding:10% 0;width:50%;text-align:center;">{$vo.name}</div> <!-- 店铺名 -->
	</div>
	<div class="cl"></div>
	<div class="washer_delete" serverid="{$vo.id}">
		<div class="delete">删除</div>
		<div class="cl"></div>
	</div>
</div>
</foreach>
<input type="hidden" class="washerId" name="washerId" />

<div id="fullbg"></div> 
<div id="dialog" style="left:30%;">
<div class="select_washer close" style="font-size:2.8rem;">消息</div> 
<div class="select_box">
			  <div class="washer" num='0'>
				<div class="" style="font-size:2.8rem;text-align:center;">您確認刪除嗎？</div>
				<div class="cl"></div>
			  </div>
		</div> 
		<div class="submit_wash">
		  	<div class="cancel fl" onclick="closeBg();" style="font-size:2.8rem;">取消</div>
		  	<div class="confirm fl" style="font-size:2.8rem;">確認</div>
		  	<div class="cl"></div>
		</div>
</div>
</form>
<script type="text/javascript">
//显示灰色 jQuery 遮罩层 
$('.delete').click(function(){
	
	var bh = $("body").height(); 
	var bw = $("body").width(); 
	$("#fullbg").css({ 
		height:'100%', 
		width:'100%', 
		display:"block" 
	}); 
	$("#dialog").show(); 
	
	var serverId = $(this).parent('.washer_delete').attr('serverid');
	$('.washerId').val(serverId);
	
	
});


$('.confirm').click(function(){
	var washerId = $('.washerId').val();
	var type = 'delete';
	var data = {washerId : washerId , type : type};
	$.ajax({
		data : data,
		url : "{:U(MODULE_NAME.'/server/change_washer_status')}",
		type:"post",
		dataType: "json",
		success: function (returndata) {
			if(returndata.status==1){
   		 		layer.open({
	 				style:'font-size:3rem;',
	 				content:returndata.info,
	 				time:2,
	 				end:function(){
	 					$('.washerId').val();
						window.location.href = window.location.href;
			 		}
 				});
   	 		}
        }
	});
});
//关闭灰色 jQuery 遮罩 
function closeBg() { 
$("#fullbg,#dialog").hide(); 
} 
$(document).ready(function(){
	/* $('.header').hide(); */
	$('title').html('我的員工');
	$('.header .title').html('我的員工');
	$('.header .left').html('<img src="__PRIVATE__/images/left.png" style="width:55%"/>');
	$('.header .right').html('');
	$('.header .left').click(function(){
		window.location.href = "{:U(MODULE_NAME.'/server/set_index')}";
	});
});
</script>
<include file='Common:footer_3'/>
